package xxdsqljobDB

import org.beetl.core.GroupTemplate
import org.beetl.core.Template
import org.beetl.core.resource.StringTemplateResourceLoader

/**
 * Created by Administrator on 2018-12-29.
 */
class BeetlUtil {
    private final static StringTemplateResourceLoader resourceLoader = new StringTemplateResourceLoader();
    private final static org.beetl.core.Configuration config = org.beetl.core.Configuration.defaultConfiguration();
    private final static GroupTemplate groupTemplate = new GroupTemplate(resourceLoader, config);

    static getStrTemplate(Map param,String strTemp){
        if(strTemp){
            Template template = groupTemplate.getTemplate(strTemp);
            if(param){
                template.binding(param)
            }
            return  template.render()
        }
    }
}
